
SET(MITK_VERSION_MAJOR "@MITK_VERSION_MAJOR@")
SET(MITK_VERSION_MINOR "@MITK_VERSION_MINOR@")
SET(MITK_VERSION_PATCH "@MITK_VERSION_PATCH@")

SET(MITK_SOURCE_DIR "@MITK_SOURCE_DIR@")
SET(ITK_DIR "@ITK_DIR@")
SET(VTK_DIR "@VTK_DIR@")

SET(MITK_INCLUDE_DIRS "@MITK_INCLUDE_DIRS_CONFIG@")
SET(QMITK_INCLUDE_DIRS "@QMITK_INCLUDE_DIRS_CONFIG@")
SET(ANN_INCLUDE_DIR "@ANN_INCLUDE_DIR@")
SET(IPSEGMENTATION_INCLUDE_DIR "@IPSEGMENTATION_INCLUDE_DIR@")
SET(MITK_LIBRARIES "@MITK_LIBRARIES@")
SET(QMITK_LIBRARIES "@QMITK_LIBRARIES@")
SET(MITK_LINK_DIRECTORIES "@MITK_LINK_DIRECTORIES@")
SET(QMITK_LINK_DIRECTORIES "@QMITK_LINK_DIRECTORIES@")
SET(VECMATH_INCLUDE_DIR "@VECMATH_INCLUDE_DIR@")
SET(IPFUNC_INCLUDE_DIR "@IPFUNC_INCLUDE_DIR@")
SET(UTILITIES_DIR "@UTILITIES_DIR@")
SET(REGISTER_QFUNCTIONALITY_CPP_IN "@REGISTER_QFUNCTIONALITY_CPP_IN@")
SET(MITK_MODULES_CONF_DIR "@MITK_MODULES_CONF_DIR@")

SET(MITK_IGT_INCLUDE_DIRS "@MITK_IGT_INCLUDE_DIRS@")

SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "@MITK_SOURCE_DIR@/CMake")

IF(MITK_USE_EXT)
  #INCLUDE(${MITK_DIR}/mitkExtConfig.cmake)
  #INCLUDE(${MITK_DIR}/QmitkExtConfig.cmake)
ENDIF()

IF(MITK_USE_IGT)
  #INCLUDE(${MITK_DIR}/mitkIGTConfig.cmake)
ENDIF()

INCLUDE("@MITK_SOURCE_DIR@/CMake/CoreHelpers.cmake")
INCLUDE("@MITK_SOURCE_DIR@/CMake/ToolExtensionHelpers.cmake")
APPLY_VTK_FLAGS()

SET(MITK_USE_QT "@MITK_USE_QT@")


IF (MITK_USE_BLUEBERRY)

  SET(BlueBerry_DIR "@MITK_BINARY_DIR@/BlueBerry")

  # There is no PocoConfig.cmake, so we set Poco specific CMake variables
  # here. This way the call to FIND_PACKAGE(Poco) in BlueBerryConfig.cmake
  # finds the Poco distribution supplied by MITK
  SET(Poco_INCLUDE_DIR
    "@MITK_SOURCE_DIR@/Utilities/Poco"
    CACHE PATH
    "top-level directory containing the poco include directories. E.g /usr/local/include/ or c:\\poco\\include\\poco-1.3.2")

  SET(Poco_LIBRARY_DIR
    "@MITK_BINARY_DIR@/bin"
    CACHE PATH
    "top-level directory containing the poco libraries.")

  INCLUDE("@MITK_SOURCE_DIR@/CMake/MITKPluginHelpers.cmake")

  IF(NOT MITK_SKIP_BUNDLELIST)
    INCLUDE("@MITK_BINARY_DIR@/Bundles/MITKCoreBundleList.cmake")
    IF(MITK_USE_EXT)
      INCLUDE("@MITK_BINARY_DIR@/Bundles/MITKModulesBundleList.cmake")
    ENDIF()
  ENDIF(NOT MITK_SKIP_BUNDLELIST)
  
  FIND_PACKAGE(BlueBerry)

  IF(NOT BlueBerry_FOUND)
    MESSAGE(SEND_ERROR "MITK does not seem to be configured with BlueBerry support. Set MITK_USE_BLUEBERRY to ON in your MITK build configuration.")
  ENDIF(NOT BlueBerry_FOUND)

  SET(MITK_PLUGIN_SOURCE_DIRS "@MITK_SOURCE_DIR@/Bundles")
  
  SET(MITK_PLUGIN_OUTPUT_DIRS @MITK_CORE_PLUGIN_OUTPUT_DIRS@)
  IF(MITK_USE_EXT)
    LIST(APPEND MITK_PLUGIN_OUTPUT_DIRS @MITK_MODULES_PLUGIN_OUTPUT_DIRS@)
  ENDIF()

  SET(MITK_LIBRARY_DIRS "@CMAKE_LIBRARY_OUTPUT_DIRECTORY@")
  SET(MITK_VTK_LIBRARY_DIRS "@VTK_LIBRARY_DIRS@")
  SET(MITK_ITK_LIBRARY_DIRS "@ITK_LIBRARY_DIRS@")

ENDIF(MITK_USE_BLUEBERRY)
